package 面试题04.暴力求解;

/**
 * @Author ：xu_xiaofeng.
 * @Date ：Created in 10:52 2021/2/3
 * @Description：
 */
public class Solution {
    // 暴力求解
    public boolean findNumberIn2DArray(int[][] matrix, int target) {
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[0].length; j++) {
                if (target == matrix[i][j]) {
                    return true;
                }
            }
        }
        return false;
    }
}
